/*
 *  This file is part of jMoviepilot.
 *  Copyright (C) 2011 Tobias Roettger <toroettg@gmail.com>
 *
 *  jMoviepilot is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *  
 *  The project site can be found at http://code.google.com/p/jmoviepilot/
 */

package de.roettger_it.jmoviepilot.util;

import java.net.URL;
import java.util.HashMap;
import java.util.LinkedList;

import org.joda.time.LocalDate;

/**
 * This class contains information about a movie.
 * 
 * @author Tobias Roettger
 * 
 */
public class Movie
{	
	private boolean on_tv;
		
	private Integer production_year;
	private Integer runtime;
	
	private Integer community_ratings_count;
	private Integer comments_count;
	
	private Double average_critics_rating;
	private Double average_community_rating;

	private LocalDate premiere_date;
	private LocalDate cinema_start_date;
	private LocalDate dvd_start_date;

	private String display_title;
	private String short_description;
	private String plain_short_description;
	private String long_description;

	private LinkedList<String> countries_list;
	private LinkedList<String> genres_list;
	
	private URL homepage;
	private URL restful_url;
	
	private Poster poster;
	
	private HashMap<String, String> alternative_identifiers;

	//TODO change type of these if implemented by moviepilot
	private String forecast;
	private String rating;
	private String watchlist;
	
	
	/**
	 * Gets the display title of a movie.
	 * 
	 * @return the display title of a movie
	 */
	public String getDisplayTitle()
	{
		return display_title;
	}

	/**
	 * Sets the display title of a movie.
	 * 
	 * @param displayTitle the display title to set
	 */
	public void setDisplayTitle(String displayTitle)
	{
		this.display_title = displayTitle;
	}

	/**
	 * Gives information if the movie has been shown on TV.
	 * 
	 * @return the onTV boolean value
	 */
	public boolean getOnTV()
	{
		return on_tv;
	}

	/**
	 * Sets the information if the movie has been shown on TV.
	 * 
	 * @param onTV the boolean value if the movie has been shown on TV to set.
	 */
	public void setOnTV(boolean onTV)
	{
		this.on_tv = onTV;
	}

	/**
	 * Gets the production year of the movie.
	 * 
	 * @return the production year of the movie
	 */
	public Integer getProductionYear()
	{
		return production_year;
	}

	/**
	 * Sets the production year of the movie.
	 * 
	 * @param productionYear the production year to set
	 */
	public void setProductionYear(int productionYear)
	{
		this.production_year = productionYear;
	}

	/**
	 * Gets the runtime of the movie.
	 * 
	 * @return the runtime of the movie
	 */
	public Integer getRuntime()
	{
		return runtime;
	}

	/**
	 * Sets the runtime of the movie.
	 * 
	 * @param runtime the runtime of the movie to set
	 */
	public void setRuntime(int runtime)
	{
		this.runtime = runtime;
	}

	/**
	 * Gets the count of the community ratings that are related to the movie.
	 * 
	 * @return the community ratings count related to the movie
	 */
	public Integer getCommunityRatingsCount()
	{
		return community_ratings_count;
	}

	/**
	 * Sets the count of the community ratings that is related to the movie.
	 *  
	 * @param communityRatingsCount the community ratings count to set
	 */
	public void setCommunityRatingsCount(int communityRatingsCount)
	{
		this.community_ratings_count = communityRatingsCount;
	}

	/**
	 * Gets the count of the comments that are related to the movie.
	 * 
	 * @return the comments count related to the movie
	 */
	public Integer getCommentsCount()
	{
		return comments_count;
	}

	/**
	 * Sets the count of the comments that are related to the movie.
	 * 
	 * @param commentsCount the comments count to set
	 */
	public void setCommentsCount(int commentsCount)
	{
		this.comments_count = commentsCount;
	}

	/**
	 * Gets the average rating of the critics that are related to the movie.
	 * 
	 * @return the average critics rating related to the movie
	 */
	public Double getAverageCriticsRating()
	{
		return average_critics_rating;
	}

	/**
	 * Sets the average rating of the critics that are related to the movie.
	 * 
	 * @param averageCriticsRating the average critics rating to set
	 */
	public void setAverageCriticsRating(double averageCriticsRating)
	{
		this.average_critics_rating = averageCriticsRating;
	}

	/**
	 * Gets the average of the community ratings that are related to the movie.  
	 * 
	 * @return the average community rating related to the movie
	 */
	public Double getAverageCommunityRating()
	{
		return average_community_rating;
	}

	/**
	 * Sets the average of the community ratings that are related to the movie.
	 * 
	 * @param averageCommunityRating the average community rating to set
	 */
	public void setAverageCommunityRating(double averageCommunityRating)
	{
		this.average_community_rating = averageCommunityRating;
	}

	/**
	 * Gets the premiere date of the movie.
	 * 
	 * @return the premiere date
	 */
	public LocalDate getPremiereDate()
	{
		return premiere_date;
	}

	/**
	 * Sets the premiere date of the movie.
	 * 
	 * @param year the premiere year to set
	 * @param monthOfYear the month of the premiere year to set
	 * @param dayOfMonth the day of premiere month to set
	 */
	public void setPremiereDate(int year, int monthOfYear, int dayOfMonth)
	{
		this.premiere_date = new LocalDate(year, monthOfYear, dayOfMonth);
	}

	/**
	 * Gets the cinema start date of the movie.
	 *  
	 * @return the cinema start date of the movie
	 */
	public LocalDate getCinemaStartDate()
	{
		return cinema_start_date;
	}

	/**
	 * Sets the cinema start date of the movie.
	 * 
	 * @param year the cinema start year to set
	 * @param monthOfYear the month of the cinema start year to set
	 * @param dayOfMonth the day of cinema start month to set
	 */
	public void setCinemaStartDate(int year, int monthOfYear, int dayOfMonth)
	{
		this.cinema_start_date = new LocalDate(year, monthOfYear, dayOfMonth);
	}

	/**
	 * Gets the DVD start date of the movie.
	 * 
	 * @return the DVD start date of the movie
	 */
	public LocalDate getDVDStartDate()
	{
		return dvd_start_date;
	}

	/**
	 * Sets the DVD start date of the movie.
	 * 
	 * @param year the DVD start year to set
	 * @param monthOfYear the month of the DVD start year to set
	 * @param dayOfMonth the day of DVD start month to set
	 */
	public void setDVDStartDate(int year, int monthOfYear, int dayOfMonth)
	{
		this.dvd_start_date = new LocalDate(year, monthOfYear, dayOfMonth);
	}

	/**
	 * Gets the short description of the movie.
	 * 
	 * @return the short description of the movie
	 */
	public String getShortDescription()
	{
		return short_description;
	}

	/**
	 * Sets the short description of the movie.
	 * 
	 * @param shortDescription the short description of the movie to set
	 */
	public void setShortDescription(String shortDescription)
	{
		this.short_description = shortDescription;
	}

	/**
	 * Gets the plain short description of the movie.
	 * 
	 * @return the plain short description of the movie
	 */
	public String getPlainShortDescription()
	{
		return plain_short_description;
	}

	/**
	 * Sets the plain short description of the movie.
	 * 
	 * @param plainShortDescription the plain short description of the movie to set
	 */
	public void setPlainShortDescription(String plainShortDescription)
	{
		this.plain_short_description = plainShortDescription;
	}

	/**
	 * Gets the long description of the movie.
	 * 
	 * @return the long description of the movie
	 */
	public String getLongDescription()
	{
		return long_description;
	}

	/**
	 * Sets the long description of the movie.
	 * 
	 * @param longDescription the long description of the movie to set
	 */
	public void setLongDescription(String longDescription)
	{
		this.long_description = longDescription;
	}

	/**
	 * Gets the list of countries where the movie takes place.
	 * 
	 * @return the countries list where the movie takes place
	 */
	public LinkedList<String> getCountriesList()
	{
		return countries_list;
	}

	/**
	 * Sets the list of countries where the movie takes place.
	 * 
	 * @param countriesList the countries list to set
	 */
	public void setCountriesList(LinkedList<String> countriesList)
	{
		this.countries_list = countriesList;
	}

	/**
	 * Gets the list of genres to which the movie belongs to.
	 * 
	 * @return the genres list of the movie
	 */
	public LinkedList<String> getGenresList()
	{
		return genres_list;
	}

	/**
	 * Sets the list of genres to which the movie belongs to.
	 * 
	 * @param genresList the genres list to set
	 */
	public void setGenresList(LinkedList<String> genresList)
	{
		this.genres_list = genresList;
	}

	/**
	 * Gets the URL of the movie homepage.
	 * 
	 * @return the URL of the movie homepage
	 */
	public URL getHomepage()
	{
		return homepage;
	}

	/**
	 * Sets the URL of the movie homepage
	 * 
	 * @param homepageURL the URL of the movie homepage to set
	 */
	public void setHomepage(URL homepageURL)
	{
		this.homepage = homepageURL;
	}

	/**
	 * Gets the restful URL of the movie.
	 * 
	 * @return the restful URL of the movie
	 */
	public URL getRestfulURL()
	{
		return restful_url;
	}
	
	/**
	 * Sets the restful URL of the movie.
	 * 
	 * @param restfulURL the restful URL to set
	 */
	public void setRestfulURL(URL restfulURL)
	{
		this.restful_url = restfulURL;
	}

	/**
	 * Gets the Poster that is related to the movie
	 * 
	 * @return the Poster of the movie
	 */
	public Poster getPoster()
	{
		return poster;
	}

	/**
	 * Sets the Poster that is related to the movie.
	 * 
	 * @param poster the Poster of the movie to set
	 */
	public void setPoster(Poster poster)
	{
		this.poster = poster;
	}

	/**
	 * Gets the alternative identifiers of the movie.
	 * 
	 * @return the alternative identifiers in a HashMap
	 */
	public HashMap<String, String> getAlternativeIdentifiers()
	{
		return alternative_identifiers;
	}

	/**
	 * Sets the alternative identifiers of the movie.
	 * 
	 * @param alternativeIdentifiers the alternative identifiers as a HashMap to set
	 */
	public void setAlternativeIdentifiers(HashMap<String, String> alternativeIdentifiers)
	{
		this.alternative_identifiers = alternativeIdentifiers;
	}

	/**
	 * Gets the forecast of the movie for an user.
	 * 
	 * <p><b>Note:</b> this feature is probably not implemented by moviepilot, yet.</p>
	 * 
	 * @return the forecast of the movie for an user
	 */
	public String getForecast()
	{
		return forecast;
	}

	/**
	 * Sets the forecast of the movie for an user.
	 * 
	 * @param forecast the forecast to set
	 */
	public void setForecast(String forecast)
	{
		this.forecast = forecast;
	}

	/**
	 * Gets the rating of the movie for an user.
	 * 
	 * <p><b>Note:</b> this feature is probably not implemented by moviepilot, yet.</p>
	 * 
	 * @return the rating of the movie for an user
	 */
	public String getRating()
	{
		return rating;
	}

	/**
	 * Sets the rating of the movie for an user.
	 * 
	 * @param rating the rating to set
	 */
	public void setRating(String rating)
	{
		this.rating = rating;
	}

	/**
	 * Gets the watchlist of the movie for an user.
	 *
	 * <p><b>Note:</b> this feature is probably not implemented by moviepilot, yet.</p>
	 *
	 * @return the watchlist of the movie for an user
	 */
	public String getWatchlist()
	{
		return watchlist;
	}

	/**
	 * Sets the watchlist of the movie for an user.
	 *
	 * @param watchlist the watchlist to set
	 */
	public void setWatchlist(String watchlist)
	{
		this.watchlist = watchlist;
	}
}
